package com.gxa.p2p.service;

import com.gxa.p2p.pojo.UserInfo;
import com.gxa.p2p.pojo.Withdrawal;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

/**
 * Created with IntelliJ IDEA.
 * User: cxy
 * Date: 2020/08/03 12:05
 * Description:
 * Version: V1.0
 */
public interface WithdrawalService {



    /**
     * 计算数据表总数和带条件的数据总数
     * @param map
     * @return
     */
    Integer count(Map<String,Object> map);

    /**
     *  分页查询
     * @param map 分页的参数
     * @return 查询的当前页的对象
     */
    List<Withdrawal> selectLimitLike(Map<String,Object> map);

    /**
     *  根据用户电话号码查询提现记录
     * @param userInfo 传入用户对象
     * @return 返回查询到的记录集合
     */
    List<Withdrawal> selectByPhoneNumber(UserInfo userInfo);

    /**
     *  修改方法
     * @param withdrawal 传入的修改的对象
     * @return 返回影响行数
     */
    Integer update(Withdrawal withdrawal);

    /**
     * 处理提现订单,审核完调用
     */
    void doWithdraw(Withdrawal withdrawal);

    /**
     * 提现记录全查询以及模糊分页查询
     * @return 返回LIST
     */
    List<Withdrawal> selectAll();
    List<Withdrawal> selectLikeLimit(Map<String, Object> map);

    /**
     * 提现请求处理
     * @param withdrawal 参数
     */
    void withdrawRequest(Withdrawal withdrawal);

    /**
     * 提现金额,密码检查
     * @param withdrawal 前端传参
     * @return 验证结果
     */
    String verify(Withdrawal withdrawal);


}
